package com.cloudschool.media.service;

import com.cloudschool.media.model.po.MediaProcess;

import java.util.List;

/**
 * @author chenhong
 * @version 1.0
 * @description TODO
 * @date 2023/3/15 13:55
 */
public interface MediaFileProcessService {

    /**
    * @description 获取待处理任务
    * @param shardIndex 
     * @param shardTotal 
     * @param count 
    * @return java.util.List<com.cloudschool.media.model.po.MediaProcess>
    * @author chenhong
    * @date 2023/3/15 13:55
    */
    public List<MediaProcess> getMediaProcessList(int shardIndex, int shardTotal, int count);

    /**
    * @description 开启一个任务
    * @param id
    * @return boolean
    * @author chenhong
    * @date 2023/3/15 14:11
    */
    public boolean startTask(long id);


    /**
    * @description 保存任务结果
    * @param taskId 
     * @param status 
     * @param fileId 
     * @param url 
     * @param errorMsg 
    * @return void
    * @author chenhong
    * @date 2023/3/15 14:14
    */
    void saveProcessFinishStatus(Long taskId,String status,String fileId,String url,String errorMsg);
}
